CSCN8010 LAB 2¶

The player of the decade

AI and ML in cybersecurity

Month Days
January 31
February 28
March 31

graph using Matplotlib

In [2]:
import matplotlib.pyplot as plt
In [4]:
ax = plt.subplot() 
ax.plot([1,2,3,4,5], [48,3,45,-1,-5])
Out[4]:
[<matplotlib.lines.Line2D at 0x2812349b010>]

Graph using seaborn

In [5]:
import seaborn as sns
In [6]:
crashes =sns.load_dataset("car_crashes").sort_values ("total", ascending=False)
In [7]:
sns.set_color_codes("pastel")
sns.barplot(x="total", y="abbrev", data=crashes, label="Total", color="b")
Out[7]:
<Axes: xlabel='total', ylabel='abbrev'>

graph using plotly

In [8]:
import plotly.express as exp
import plotly.offline as poff 
In [9]:
fig =exp.line(x=["48","49","50"], y=[1,2,1])
poff.init_notebook_mode()
fig.show()